home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 25
/
AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso
/
PublicDomain
/
Spiele
/
GalagawarsV1_5
/
GWars
/
InterleavedShapeShunter.asc
< prev
next >
Wrap
Text File
|
1999-11-13
|
2KB
|
86 lines
; Shapeshunter 2000
; By Wiremu TeKani July 1999
; converts normal shape into inmap (interleaved bitmap) format
; An inmap is an optimised way of blitting graphics. Generally,
; if you have a 5 bitplane bitmap it means the computer has to
; access the blitter 5 times, and it won't let you use the CPU
; until the final bitplane has been blitted.
; An inmap mushes all those bitplanes together, making it a
; ONE bitplane bitmap that is 5 times the height. With some
; bitmap display trickery, they can be displayed just like
; a conventional shape.
; Contact me at:
; tekani@yahoo.com
; wtekani@netscape.net
; Initialisation
#dept=5
Sh$="Stl:Gwars/allshapes"
#lastshp=110
BitMap 0,320,256,#dept
;For a=1 To #dept
BitPlanesBitMap 0,1,1
BitPlanesBitMap 0,2,2
BitPlanesBitMap 0,3,4
BitPlanesBitMap 0,4,8
BitPlanesBitMap 0,5,16
;next a
InitBank 0,40*256*#dept,$10002 ; Get some free CHIP memory.
CludgeBitMap 9,320,256*#dept,1,Bank(0) ; And make it a planar bitmap.
; Load shapes here
LoadShapes 0,Sh$
; Display macro
InitCopList 0,44,256,$13011,8,2,0
BLITZ
CreateDisplay 0
DisplayBitMap 0,3
; Interleave shapes
BitMapOutput 9
For shp=0 To #lastshp
Use BitMap 0
Cls 0
If shp<>43
sw=ShapeWidth(shp)
sh=ShapeHeight(shp)
Blit shp,0,0
For a=1 To #dept
For y=0 To sh
Use BitMap a
GetaShape 150,0,y,sw,1
Use BitMap 9
Block 150,0,(y*#dept)+(a-1)
Next y
Next a
GetaShape shp,0,0,sw,sh*#dept
Locate 0,0:Print Str$(shp)
EndIf
DisplayBitMap 0,9,0,0
VWait
Use BitMap 9
Cls 0
Next shp
QAMIGA
VWait 150
SaveShapes 0,#lastshp,Sh$+".int"
MouseWait